/**
 * @date 2017年3月5日
 * 
 */
package com.cmccsi;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LINKT
 *
 */
@SpringBootApplication
@Controller
public class Application {

	@RequestMapping("/")
	public String greeting() {
		return "你好,王馨毅。";
	}
	@RequestMapping("/hello/{name}")
	public String hello(@PathVariable("name") String name,Model model) {
		model.addAttribute("name",name);
		return "hello";
	}
	
	public static void main(String[] arg) {
		SpringApplication.run(Application.class, arg);
	}
}
